<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['rci.booking.entry.mgmt.menu']}">
	<h:panelGrid width="100%" columns="1">
		<h:panelGroup>
			<h:panelGrid>
				<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
			</h:panelGrid>		
		</h:panelGroup>
		
		<h:panelGroup>
			<h:panelGrid width="100%">
				<h:panelGroup>
				    <h:outputText value="#{messages['rci.booking.entry']}" styleClass="sub_header" />
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
				</h:panelGroup>
			</h:panelGrid>
		</h:panelGroup>
		
	</h:panelGrid>
	
	<t:panelGrid columns="2" rendered="#{adminRCIBean.rciBookingEntry.status!='Pending'}" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		 <h:panelGroup>
			<h:outputLabel  value="#{messages['rci.bulk.bank.deposit.label']}" styleClass="standardText_Label" />
		 </h:panelGroup>
         <h:panelGroup>
			<h:panelGrid columns="4">
				<t:inputText  readonly="true" size="5" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciBulkBank.year}"></t:inputText>
				<t:inputText  readonly="true" size="7"  styleClass="standardText" value=" Week #{adminRCIBean.rciBookingEntry.rciBulkBank.week} "></t:inputText>
				<t:inputText  readonly="true" size="20" styleClass="standardText" value=" #{adminRCIBean.rciBookingEntry.rciBulkBank.partnerProduct.partner.compName} "></t:inputText>
				<t:inputText  readonly="true" size="20" styleClass="standardText" value=" #{adminRCIBean.rciBookingEntry.rciBulkBank.partnerProduct.name} "></t:inputText>
			</h:panelGrid>
        </h:panelGroup>

<%-- 
		<h:panelGroup>
			<h:outputLabel for="rciType" value="#{messages['rci.type']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
           <t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciType}"></t:inputText>
		</h:panelGroup>	
--%>

		<h:panelGroup  >
			<h:outputLabel for="rciSplitWeekConfigId" value="#{messages['rci.split.week']}" styleClass="standardText_Label" />
		</h:panelGroup>
	    <t:inputText   readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciSplitWeekConfig.rciSplitWeekDesc}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['rci.id.no']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciIdNo}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['rci.member']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberFullName}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['guest.name.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciGuestName}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['address']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  size="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr1}"></t:inputText>

		<h:outputText  ></h:outputText>
		<t:inputText  readonly="true"  size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr2}"></t:inputText>
		
		<h:outputText  ></h:outputText>
		<t:inputText  readonly="true"  size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr3}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['booking.checkin.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciCheckInDate}">
			<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
		</t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['booking.checkout.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciCheckOutDate}">
			<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
		</t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['booking.confirmation.no.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.confirmationNo}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['booking.confirmation.date.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.confirmationDate}">
			<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
		</t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['status']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.status}"></t:inputText>

		<rich:spacer height="10"></rich:spacer>
		
		<t:panelGroup>
		   <t:panelGrid columns="1">
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminRCIBean.initRCIBookingEntryAction}" actionListener="#{adminRCIBean.initRCIBookingEntryActionListener}" immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>

    </t:panelGrid>
	
	<t:panelGrid columns="2" rendered="#{adminRCIBean.rciBookingEntry.status=='Pending'}" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		
 		<h:panelGroup>
			<h:outputLabel  value="#{messages['rci.bulk.bank.deposit.label']}" styleClass="standardText_Label" />
		 </h:panelGroup>
         <h:panelGroup>
			<h:panelGrid columns="4">
				<t:inputText  readonly="true" size="5" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciBulkBank.year}"></t:inputText>
				<t:inputText  readonly="true" size="7"  styleClass="standardText" value=" Week #{adminRCIBean.rciBookingEntry.rciBulkBank.week} "></t:inputText>
				<t:inputText  readonly="true" size="20" styleClass="standardText" value=" #{adminRCIBean.rciBookingEntry.rciBulkBank.partnerProduct.partner.compName} "></t:inputText>
				<t:inputText  readonly="true" size="20" styleClass="standardText" value=" #{adminRCIBean.rciBookingEntry.rciBulkBank.partnerProduct.name} "></t:inputText>
			</h:panelGrid>
        </h:panelGroup>

<%-- 
		<h:outputText></h:outputText>
		<t:message for="rciBulkBankId" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciBulkBankId" value="#{messages['rci.bulk.bank.deposit.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="rciBulkBankId" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciBulkBank.rciBulkBankId}" readonly="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectRCIBulkBankList}"/>
			</t:selectOneMenu>
		</h:panelGroup>		
--%>		
<%-- 
	    <h:outputText></h:outputText>
		<t:message for="rciType" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciType" value="#{messages['rci.type']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="rciType" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciType}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectRCIType}"/>
				<a4j:support ajaxSingle="true" event="onchange" reRender="splitWeekDiv1,splitWeekDiv2,splitWeekDiv3,splitWeekDiv4,rciMemberRefId,checkInDiv1,checkInDiv2,checkInDiv3,checkInDiv4"></a4j:support>
			</t:selectOneMenu>
		</h:panelGroup>		
--%>

 	 <h:outputText  ></h:outputText>
     <t:message   for="rciSplitWeekConfigId" styleClass="error"></t:message>
     <h:panelGroup id="splitWeek3" rendered="#{adminRCIBean.incomingMember}">
		<h:outputText value="*" styleClass="standardText_Mandatory" />
		<h:outputLabel for="rciSplitWeekConfigId" value="#{messages['rci.split.week']}" styleClass="standardText_Label" />
	 </h:panelGroup>
     <h:panelGroup id="splitWeek4" rendered="#{adminRCIBean.incomingMember}">
			<t:selectOneMenu id="rciSplitWeekConfigId" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciSplitWeekConfig.rciSplitWeekConfigId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectRCISplitWeeks}"/>
			</t:selectOneMenu>
	 </h:panelGroup>	
  	
     <h:outputText  ></h:outputText>
	 <t:message  for="rciIdNo" styleClass="error"></t:message>
	 <h:panelGroup >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciIdNo" value="#{messages['rci.id.no']}" styleClass="standardText_Label" />
	 </h:panelGroup>
	 <h:panelGroup >
			<t:inputText id="rciIdNo" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciIdNo}"></t:inputText>
	 </h:panelGroup>		

	 <h:outputText  ></h:outputText>
	 <t:message  for="rciMemberFullname" styleClass="error"></t:message>
	 <h:panelGroup >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciMemberFullname" value="#{messages['rci.member.name.label']}" styleClass="standardText_Label" />
	 </h:panelGroup>
	 <h:panelGroup >
			<t:inputText id="rciMemberFullname" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberFullName}"></t:inputText>
	 </h:panelGroup>		

	 <h:outputText  ></h:outputText>
	 <t:message  for="guestName" styleClass="error"></t:message>
	 <h:panelGroup >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="guestName" value="#{messages['guest.name.label']}" styleClass="standardText_Label" />
	 </h:panelGroup>
	 <h:panelGroup >
			<t:inputText id="guestName" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciGuestName}"></t:inputText>
	 </h:panelGroup>		

	<h:outputLabel  value="#{messages['address']}" styleClass="standardText_Label" />
	<t:inputText  required="false" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr1}"></t:inputText>
		
	<h:outputText  ></h:outputText>
	<t:inputText  required="false" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr2}"></t:inputText>
		
	<h:outputText  ></h:outputText>
	<t:inputText  required="false" size="50" maxlength="50" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberAddr3}"></t:inputText>

<%-- 
		<h:outputText  ></h:outputText>
		<t:message  for="rciMemberRefId" styleClass="error"></t:message>
		<h:panelGroup >
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="rciMemberRefId" value="#{messages['rci.member']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup >
			<t:selectOneMenu id="rciMemberRefId" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberRefId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{adminRCIBean.selectRCIMembers}"/>
			</t:selectOneMenu>
		</h:panelGroup>		
--%>

	  
		<rich:spacer height="10"></rich:spacer>
		
		<t:panelGroup>
		   <t:panelGrid columns="2">
		   		<h:commandButton value="#{messages['update']}" styleClass="button" action="#{adminRCIBean.updateRCIBookingEntryAction}" actionListener="#{adminRCIBean.updateRCIBookingEntryActionListener}"></h:commandButton>
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminRCIBean.initRCIBookingEntryAction}" actionListener="#{adminRCIBean.initRCIBookingEntryActionListener}" immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
	</t:panelGrid>
</rich:panel>	